let userTable = require("../model/userTable");

module.exports = {
    query: (params) => {
        return userTable.find(params);

    },
    insert: (info) => {
        return userTable.insertMany([info])
    },
    insertmany: (list) => {
        return userTable.insertMany(list)
    },
    deluser: (info) => {
        return userTable.deleteOne(info) //{_id:_id}
    },
    queryall: (params, skipnum, shownum) => {
        return userTable.find(params).skip(skipnum).limit(shownum)

    },
    count: (params) => {
        return userTable.find(params).count(); //获取数据总数
    },
}